Skip to content

Conversation

@MananTank
Copy link
Member

@MananTank MananTank commented Dec 20, 2024

Problem solved

Fixes: #5791

Problem:

User uploads a CSV1 and then uploads a CSV2 - CSV2 is ignored and CSV1's data is sent instead of CSV2 because of incorrect query cache key


PR-Codex overview

This PR focuses on improving the handling of queries in the useCsvUpload hook by changing the mapping of rawData to use a more descriptive variable name and ensuring the correct item is passed to the checkIsAddress function.

Detailed summary

  • Changed the variable name in the map function from o to item for clarity.
  • Updated the queryKey to use item directly instead of o.address.
  • Ensured the queryFn passes the correct item to checkIsAddress.

✨ Ask PR-Codex anything about this PR by commenting with /codex {your question}

@linear
Copy link

linear bot commented Dec 20, 2024

@vercel vercel bot temporarily deployed to Preview – wallet-ui December 20, 2024 11:39 Inactive
@vercel
Copy link

vercel bot commented Dec 20, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
thirdweb-www ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 20, 2024 0:23am
3 Skipped Deployments
Name Status Preview Comments Updated (UTC)
docs-v2 ⬜️ Skipped (Inspect) Dec 20, 2024 0:23am
thirdweb_playground ⬜️ Skipped (Inspect) Dec 20, 2024 0:23am
wallet-ui ⬜️ Skipped (Inspect) Dec 20, 2024 0:23am

@changeset-bot
Copy link

changeset-bot bot commented Dec 20, 2024

⚠️ No Changeset found

Latest commit: cb66be4

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@vercel vercel bot temporarily deployed to Preview – thirdweb_playground December 20, 2024 11:39 Inactive
@vercel vercel bot temporarily deployed to Preview – docs-v2 December 20, 2024 11:39 Inactive
@MananTank MananTank marked this pull request as ready for review December 20, 2024 11:39
@MananTank MananTank requested review from a team and jakubkrehel as code owners December 20, 2024 11:39
@github-actions github-actions bot added the Dashboard Involves changes to the Dashboard. label Dec 20, 2024
Copy link
Member Author

MananTank commented Dec 20, 2024


How to use the Graphite Merge Queue

Add either label to this PR to merge it via the merge queue:

  • merge-queue - adds this PR to the back of the merge queue
  • hotfix - for urgent hot fixes, skip the queue and merge this PR next

You must have a Graphite account in order to use the merge queue. Sign up using this link.

An organization admin has enabled the Graphite Merge Queue in this repository.

Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue.

This stack of pull requests is managed by Graphite. Learn more about stacking.

@codecov
Copy link

codecov bot commented Dec 20, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 53.34%. Comparing base (cfbe8c3) to head (cb66be4).
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #5820   +/-   ##
=======================================
  Coverage   53.34%   53.34%           
=======================================
  Files        1101     1101           
  Lines       59124    59124           
  Branches     4825     4825           
=======================================
  Hits        31541    31541           
  Misses      26864    26864           
  Partials      719      719           
Flag Coverage Δ *Carryforward flag
legacy_packages 65.68% <ø> (ø) Carriedforward from cfbe8c3
packages 50.56% <ø> (ø)

*This pull request uses carry forward flags. Click here to find out more.

@github-actions
Copy link
Contributor

github-actions bot commented Dec 20, 2024

size-limit report 📦

Path Size Loading time (3g) Running time (snapdragon) Total time
thirdweb (esm) 45.02 KB (0%) 901 ms (0%) 3.1 s (+55.04% 🔺) 4 s
thirdweb (cjs) 110.76 KB (0%) 2.3 s (0%) 6.6 s (-8.39% 🔽) 8.8 s
thirdweb (minimal + tree-shaking) 5.58 KB (0%) 112 ms (0%) 372 ms (+57.76% 🔺) 484 ms
thirdweb/chains (tree-shaking) 506 B (0%) 10 ms (0%) 85 ms (+23.87% 🔺) 95 ms
thirdweb/react (minimal + tree-shaking) 19.1 KB (0%) 383 ms (0%) 680 ms (-12.09% 🔽) 1.1 s

@kien-ngo kien-ngo self-requested a review December 20, 2024 12:18
Copy link
Contributor

@kien-ngo kien-ngo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@graphite-app
Copy link
Contributor

graphite-app bot commented Dec 20, 2024

Merge activity

## Problem solved

Fixes: #5791

Problem:

User uploads a CSV1 and then uploads a CSV2 - CSV2 is ignored and CSV1's data is sent instead of CSV2 because of incorrect query cache key

<!-- start pr-codex -->

---

## PR-Codex overview
This PR focuses on refactoring the `normalizeQuery` in the `useCsvUpload` hook to improve clarity and consistency in parameter naming.

### Detailed summary
- Changed the parameter name from `o` to `item` in the `rawData.map` function for better readability.
- Updated the `queryKey` to use `item` directly instead of `o.address`.
- Maintained the same functionality while enhancing code clarity.

> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}`

<!-- end pr-codex -->
@MananTank MananTank force-pushed the 12-20-_tool-2773_fix_incorrect_caching_in_usecsvupload_hook branch from 453c180 to cb66be4 Compare December 20, 2024 12:20
@vercel vercel bot temporarily deployed to Preview – docs-v2 December 20, 2024 12:20 Inactive
@vercel vercel bot temporarily deployed to Preview – thirdweb_playground December 20, 2024 12:20 Inactive
@vercel vercel bot temporarily deployed to Preview – wallet-ui December 20, 2024 12:20 Inactive
@graphite-app graphite-app bot merged commit cb66be4 into main Dec 20, 2024
31 checks passed
@graphite-app graphite-app bot deleted the 12-20-_tool-2773_fix_incorrect_caching_in_usecsvupload_hook branch December 20, 2024 12:23
@vercel vercel bot temporarily deployed to Production – wallet-ui December 20, 2024 12:23 Inactive
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Dashboard Involves changes to the Dashboard.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Allowlist csv file bulk application issue in NFT ClaimConditions

3 participants